#include "CAdvSourceSection.h"

CAdvSourceSection::CAdvSourceSection(void):IAdvSectionData(ADV_SOURCE_SECTION_TABLE_ID)
{
}

CAdvSourceSection::~CAdvSourceSection(void)
{
	 
}

void CAdvSourceSection::GetData(BYTE* buff  , int &len,int slotId)
{
}
 
void CAdvSourceSection::GetData(BYTE* buff  , int &len)
{  
	if(1 == m_nType)
	{ 
		m_advSourceInfo.GetDiscriptorData(buff,len);   
	}
	else if(2 == m_nType)
	{ 
		m_advElementInfo.GetDiscriptorData(buff,len);   
	}else if(3 == m_nType)
	{ 
		m_advData.GetDiscriptorData(buff,len);   
	}
}

 int CAdvSourceSection::GetLen(int slotId) 
 {
	 return 0;
 }
int CAdvSourceSection::GetLen()
{   
	if(1 == m_nType)
	{  
		m_advSourceInfo.GetDiscriptoLenght();   
	}
	else if(2 == m_nType)
	{ 
		m_advElementInfo.GetDiscriptoLenght();;   
	}if(3 == m_nType)
	{ 
		m_advData.GetDiscriptoLenght();  
	}
	return 0;
}